1. Field of the Invention
The invention relates to an abnormality detection system for a rotation angle sensor.
2. Description of the Related Art
As described in, for example, Japanese Patent Application Publication No. 2011-95094 (JP 2011-95094 A) (FIG. 14), using a magnetic sensor as a rotation angle sensor that detects a rotation angle of a rotary shaft of a motor or the like has been conventionally known. The magnetic sensor has two bridge circuits each including four magnetoresistive elements. The two bridge circuits generate electrical signals based on the direction of a magnetic field generated by a magnet disposed on the rotary shaft. The first bridge circuit generates two electrical signals corresponding to a cosine component of the rotation angle of the rotary shaft, and the second bridge circuit generates two electrical signals corresponding to a sine component of the rotation angle of the rotary shaft. A microcomputer obtains the cosine component of the rotation angle on the basis of the difference between the two electrical signals corresponding to the cosine component, and obtains the sine component of the rotation angle on the basis of the difference between the two electrical signals corresponding to the sine component. The microcomputer obtains the rotation angle of the rotary shaft by computing an are tangent on the basis of the cosine component and the sine component.
The microcomputer detects the presence or absence of an abnormality of the magnetic sensor in order to ensure the reliability of detection of the rotation angle. The microcomputer detects the presence or absence of an abnormality of the magnetic sensor using the fact that the value of the sum of squares of the cosine component and the sine component (=sin2 θ+cos2 θ) is kept at a constant value when the magnetic sensor is normally operating. The microcomputer determines that an abnormality has occurred in the magnetic sensor when the value of the sum of squares falls outside an allowable range.
As illustrated in FIG. 6, when the cosine component and the sine component acquired by the microcomputer with a prescribed sampling period are plotted on an orthogonal coordinate system of cos θ and sin θ, the locus of the plotted components forms a circle with a radius R0 if the cosine component and the sine component are normal. The allowable range of the values of the sum of squares is set by providing a range having a constant width on each of the inside and outside of the normal circle with the radius R0. An upper limit circle with a radius R1, which is the upper limit of the allowable range, is set outside the normal circle with the radius R0, and a lower limit circle with a radius R2, which is the lower limit of the allowable range, is set inside the normal circle with the radius R0. When the cosine component and the sine component are plotted outside the upper limit circle or inside the lower limit circle on the orthogonal coordinate system of cos θ and sinθ, the microcomputer determines that an abnormality has occurred in the magnetic sensor.
However, when the presence or absence of an abnormality of the magnetic sensor is detected on the basis of the value of the sum of squares of the cosine component and the sine component, there is the following problem. The electrical signals generated by the magnetic sensor are influenced by the temperature. The amplitudes of a total of four electrical signals generated by the two bridge circuits vary depending on the ambient temperature of the moment. Therefore, the allowable range, that is, the range of values of the sum of squares, which should be recognized as being normal, needs to be set to a range that is larger than an original allowable range by an amount corresponding to the amplitude variations due to the temperature characteristics of the magnetic sensor. As a result, a value of the sum of squares that should be recognized as being abnormal may fall inside the allowable range.